package com.lagou.service.impl;

import com.lagou.dao.ArticleDao;
import com.lagou.domain.Article;
import com.lagou.service.ArticleService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

/**
 * @author StarryHorizon
 * @create 2022-02-28 22:11
 */
@Service //生成该类的实例存到IOC容器中
public class ArticleServiceImpl implements ArticleService {

    @Autowired //实现注入
    private ArticleDao articleDao;

    /*
        添加文章信息
     */
    @Override
    public void save(Article article) {
        //int i = 1 / 0;
        articleDao.save(article);
    }
}
